package com.pan.admin.module.common.service.impl;

import com.pan.admin.module.common.dao.DistrictDao;
import com.pan.admin.module.common.entity.DistrictPO;
import com.pan.admin.module.common.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DistrictServiceImpl implements DistrictService {

    @Autowired
    private DistrictDao districtDao;

    @Override
    @Transactional(readOnly = true)
    public List<DistrictPO> list() {
        return districtDao.list();
    }

    @Override
    @Transactional(readOnly = true)
    public DistrictPO getDistrictByCode(String code) {
        return districtDao.getDistrictByCode(code);
    }
}
